3.2.24 \(\int (a+b \text {sech}^2(c+d x))^3 \tanh ^4(c+d x) \, dx\) [124]

3.2.24.1 Optimal result
3.2.24.2 Mathematica [B] (verified)
3.2.24.3 Rubi [A] (verified)
3.2.24.4 Maple [A] (verified)
3.2.24.5 Fricas [B] (verification not implemented)
3.2.24.6 Sympy [F]
3.2.24.7 Maxima [B] (verification not implemented)
3.2.24.8 Giac [B] (verification not implemented)
3.2.24.9 Mupad [B] (verification not implemented)

3.2.24.1 Optimal result

Integrand size = 23, antiderivative size = 110 \[ \int \left (a+b \text {sech}^2(c+d x)\right )^3 \tanh ^4(c+d x) \, dx=a^3 x-\frac {a^3 \tanh (c+d x)}{d}-\frac {a^3 \tanh ^3(c+d x)}{3 d}+\frac {b \left (3 a^2+3 a b+b^2\right ) \tanh ^5(c+d x)}{5 d}-\frac {b^2 (3 a+2 b) \tanh ^7(c+d x)}{7 d}+\frac {b^3 \tanh ^9(c+d x)}{9 d} \]

output
a^3*x-a^3*tanh(d*x+c)/d-1/3*a^3*tanh(d*x+c)^3/d+1/5*b*(3*a^2+3*a*b+b^2)*ta 
nh(d*x+c)^5/d-1/7*b^2*(3*a+2*b)*tanh(d*x+c)^7/d+1/9*b^3*tanh(d*x+c)^9/d
 
3.2.24.2 Mathematica [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(301\) vs. \(2(110)=220\).

Time = 8.13 (sec) , antiderivative size = 301, normalized size of antiderivative = 2.74 \[ \int \left (a+b \text {sech}^2(c+d x)\right )^3 \tanh ^4(c+d x) \, dx=\frac {8 \left (b+a \cosh ^2(c+d x)\right )^3 \text {sech}^9(c+d x) \left (315 a^3 d x \cosh ^9(c+d x)+35 b^3 \text {sech}(c) \sinh (d x)+5 (27 a-10 b) b^2 \cosh ^2(c+d x) \text {sech}(c) \sinh (d x)+3 b \left (63 a^2-72 a b+b^2\right ) \cosh ^4(c+d x) \text {sech}(c) \sinh (d x)+\left (105 a^3-378 a^2 b+27 a b^2+4 b^3\right ) \cosh ^6(c+d x) \text {sech}(c) \sinh (d x)-\left (420 a^3-189 a^2 b-54 a b^2-8 b^3\right ) \cosh ^8(c+d x) \text {sech}(c) \sinh (d x)+35 b^3 \cosh (c+d x) \tanh (c)+5 (27 a-10 b) b^2 \cosh ^3(c+d x) \tanh (c)+3 b \left (63 a^2-72 a b+b^2\right ) \cosh ^5(c+d x) \tanh (c)+\left (105 a^3-378 a^2 b+27 a b^2+4 b^3\right ) \cosh ^7(c+d x) \tanh (c)\right )}{315 d (a+2 b+a \cosh (2 (c+d x)))^3} \]

input
Integrate[(a + b*Sech[c + d*x]^2)^3*Tanh[c + d*x]^4,x]
 
output
(8*(b + a*Cosh[c + d*x]^2)^3*Sech[c + d*x]^9*(315*a^3*d*x*Cosh[c + d*x]^9 
+ 35*b^3*Sech[c]*Sinh[d*x] + 5*(27*a - 10*b)*b^2*Cosh[c + d*x]^2*Sech[c]*S 
inh[d*x] + 3*b*(63*a^2 - 72*a*b + b^2)*Cosh[c + d*x]^4*Sech[c]*Sinh[d*x] + 
 (105*a^3 - 378*a^2*b + 27*a*b^2 + 4*b^3)*Cosh[c + d*x]^6*Sech[c]*Sinh[d*x 
] - (420*a^3 - 189*a^2*b - 54*a*b^2 - 8*b^3)*Cosh[c + d*x]^8*Sech[c]*Sinh[ 
d*x] + 35*b^3*Cosh[c + d*x]*Tanh[c] + 5*(27*a - 10*b)*b^2*Cosh[c + d*x]^3* 
Tanh[c] + 3*b*(63*a^2 - 72*a*b + b^2)*Cosh[c + d*x]^5*Tanh[c] + (105*a^3 - 
 378*a^2*b + 27*a*b^2 + 4*b^3)*Cosh[c + d*x]^7*Tanh[c]))/(315*d*(a + 2*b + 
 a*Cosh[2*(c + d*x)])^3)
 
3.2.24.3 Rubi [A] (verified)

Time = 0.38 (sec) , antiderivative size = 105, normalized size of antiderivative = 0.95, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.217, Rules used = {3042, 4629, 2075, 364, 2009}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \tanh ^4(c+d x) \left (a+b \text {sech}^2(c+d x)\right )^3 \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \tan (i c+i d x)^4 \left (a+b \sec (i c+i d x)^2\right )^3dx\)

\(\Big \downarrow \) 4629

\(\displaystyle \frac {\int \frac {\tanh ^4(c+d x) \left (a+b \left (1-\tanh ^2(c+d x)\right )\right )^3}{1-\tanh ^2(c+d x)}d\tanh (c+d x)}{d}\)

\(\Big \downarrow \) 2075

\(\displaystyle \frac {\int \frac {\tanh ^4(c+d x) \left (-b \tanh ^2(c+d x)+a+b\right )^3}{1-\tanh ^2(c+d x)}d\tanh (c+d x)}{d}\)

\(\Big \downarrow \) 364

\(\displaystyle \frac {\int \left (b^3 \tanh ^8(c+d x)-b^2 (3 a+2 b) \tanh ^6(c+d x)+b \left (3 a^2+3 b a+b^2\right ) \tanh ^4(c+d x)-a^3 \tanh ^2(c+d x)-a^3+\frac {a^3}{1-\tanh ^2(c+d x)}\right )d\tanh (c+d x)}{d}\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {a^3 \text {arctanh}(\tanh (c+d x))-\frac {1}{3} a^3 \tanh ^3(c+d x)-a^3 \tanh (c+d x)+\frac {1}{5} b \left (3 a^2+3 a b+b^2\right ) \tanh ^5(c+d x)-\frac {1}{7} b^2 (3 a+2 b) \tanh ^7(c+d x)+\frac {1}{9} b^3 \tanh ^9(c+d x)}{d}\)

input
Int[(a + b*Sech[c + d*x]^2)^3*Tanh[c + d*x]^4,x]
 
output
(a^3*ArcTanh[Tanh[c + d*x]] - a^3*Tanh[c + d*x] - (a^3*Tanh[c + d*x]^3)/3 
+ (b*(3*a^2 + 3*a*b + b^2)*Tanh[c + d*x]^5)/5 - (b^2*(3*a + 2*b)*Tanh[c + 
d*x]^7)/7 + (b^3*Tanh[c + d*x]^9)/9)/d
 

3.2.24.3.1 Defintions of rubi rules used

rule 364
Int[(((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^2)^(p_))/((c_) + (d_.)*(x_)^2), 
x_Symbol] :> Int[ExpandIntegrand[(e*x)^m*((a + b*x^2)^p/(c + d*x^2)), x], x 
] /; FreeQ[{a, b, c, d, e, m}, x] && NeQ[b*c - a*d, 0] && IGtQ[p, 0] && (In 
tegerQ[m] || IGtQ[2*(m + 1), 0] ||  !RationalQ[m])
 

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 2075
Int[(u_)^(p_.)*(v_)^(q_.)*((e_.)*(x_))^(m_.), x_Symbol] :> Int[(e*x)^m*Expa 
ndToSum[u, x]^p*ExpandToSum[v, x]^q, x] /; FreeQ[{e, m, p, q}, x] && Binomi 
alQ[{u, v}, x] && EqQ[BinomialDegree[u, x] - BinomialDegree[v, x], 0] &&  ! 
BinomialMatchQ[{u, v}, x]
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 4629
Int[((a_) + (b_.)*sec[(e_.) + (f_.)*(x_)]^(n_))^(p_.)*((d_.)*tan[(e_.) + (f 
_.)*(x_)])^(m_), x_Symbol] :> With[{ff = FreeFactors[Tan[e + f*x], x]}, Sim 
p[ff/f   Subst[Int[(d*ff*x)^m*((a + b*(1 + ff^2*x^2)^(n/2))^p/(1 + ff^2*x^2 
)), x], x, Tan[e + f*x]/ff], x]] /; FreeQ[{a, b, d, e, f, m, p}, x] && Inte 
gerQ[n/2] && (IntegerQ[m/2] || EqQ[n, 2])
 
3.2.24.4 Maple [A] (verified)

Time = 149.03 (sec) , antiderivative size = 135, normalized size of antiderivative = 1.23

method result size
parts \(\frac {a^{3} \left (-\frac {\tanh \left (d x +c \right )^{3}}{3}-\tanh \left (d x +c \right )-\frac {\ln \left (\tanh \left (d x +c \right )-1\right )}{2}+\frac {\ln \left (\tanh \left (d x +c \right )+1\right )}{2}\right )}{d}+\frac {b^{3} \left (\frac {\tanh \left (d x +c \right )^{9}}{9}-\frac {2 \tanh \left (d x +c \right )^{7}}{7}+\frac {\tanh \left (d x +c \right )^{5}}{5}\right )}{d}+\frac {3 a^{2} b \tanh \left (d x +c \right )^{5}}{5 d}+\frac {3 a \,b^{2} \left (-\frac {\tanh \left (d x +c \right )^{7}}{7}+\frac {\tanh \left (d x +c \right )^{5}}{5}\right )}{d}\) \(135\)
derivativedivides \(\frac {a^{3} \left (d x +c -\tanh \left (d x +c \right )-\frac {\tanh \left (d x +c \right )^{3}}{3}\right )+3 a^{2} b \left (-\frac {\sinh \left (d x +c \right )^{3}}{2 \cosh \left (d x +c \right )^{5}}-\frac {3 \sinh \left (d x +c \right )}{8 \cosh \left (d x +c \right )^{5}}+\frac {3 \left (\frac {8}{15}+\frac {\operatorname {sech}\left (d x +c \right )^{4}}{5}+\frac {4 \operatorname {sech}\left (d x +c \right )^{2}}{15}\right ) \tanh \left (d x +c \right )}{8}\right )+3 a \,b^{2} \left (-\frac {\sinh \left (d x +c \right )^{3}}{4 \cosh \left (d x +c \right )^{7}}-\frac {\sinh \left (d x +c \right )}{8 \cosh \left (d x +c \right )^{7}}+\frac {\left (\frac {16}{35}+\frac {\operatorname {sech}\left (d x +c \right )^{6}}{7}+\frac {6 \operatorname {sech}\left (d x +c \right )^{4}}{35}+\frac {8 \operatorname {sech}\left (d x +c \right )^{2}}{35}\right ) \tanh \left (d x +c \right )}{8}\right )+b^{3} \left (-\frac {\sinh \left (d x +c \right )^{3}}{6 \cosh \left (d x +c \right )^{9}}-\frac {\sinh \left (d x +c \right )}{16 \cosh \left (d x +c \right )^{9}}+\frac {\left (\frac {128}{315}+\frac {\operatorname {sech}\left (d x +c \right )^{8}}{9}+\frac {8 \operatorname {sech}\left (d x +c \right )^{6}}{63}+\frac {16 \operatorname {sech}\left (d x +c \right )^{4}}{105}+\frac {64 \operatorname {sech}\left (d x +c \right )^{2}}{315}\right ) \tanh \left (d x +c \right )}{16}\right )}{d}\) \(274\)
default \(\frac {a^{3} \left (d x +c -\tanh \left (d x +c \right )-\frac {\tanh \left (d x +c \right )^{3}}{3}\right )+3 a^{2} b \left (-\frac {\sinh \left (d x +c \right )^{3}}{2 \cosh \left (d x +c \right )^{5}}-\frac {3 \sinh \left (d x +c \right )}{8 \cosh \left (d x +c \right )^{5}}+\frac {3 \left (\frac {8}{15}+\frac {\operatorname {sech}\left (d x +c \right )^{4}}{5}+\frac {4 \operatorname {sech}\left (d x +c \right )^{2}}{15}\right ) \tanh \left (d x +c \right )}{8}\right )+3 a \,b^{2} \left (-\frac {\sinh \left (d x +c \right )^{3}}{4 \cosh \left (d x +c \right )^{7}}-\frac {\sinh \left (d x +c \right )}{8 \cosh \left (d x +c \right )^{7}}+\frac {\left (\frac {16}{35}+\frac {\operatorname {sech}\left (d x +c \right )^{6}}{7}+\frac {6 \operatorname {sech}\left (d x +c \right )^{4}}{35}+\frac {8 \operatorname {sech}\left (d x +c \right )^{2}}{35}\right ) \tanh \left (d x +c \right )}{8}\right )+b^{3} \left (-\frac {\sinh \left (d x +c \right )^{3}}{6 \cosh \left (d x +c \right )^{9}}-\frac {\sinh \left (d x +c \right )}{16 \cosh \left (d x +c \right )^{9}}+\frac {\left (\frac {128}{315}+\frac {\operatorname {sech}\left (d x +c \right )^{8}}{9}+\frac {8 \operatorname {sech}\left (d x +c \right )^{6}}{63}+\frac {16 \operatorname {sech}\left (d x +c \right )^{4}}{105}+\frac {64 \operatorname {sech}\left (d x +c \right )^{2}}{315}\right ) \tanh \left (d x +c \right )}{16}\right )}{d}\) \(274\)
risch \(a^{3} x +\frac {156 a^{3} {\mathrm e}^{10 d x +10 c}+16 b^{3} {\mathrm e}^{10 d x +10 c}+180 a^{3} {\mathrm e}^{8 d x +8 c}-48 a^{2} b \,{\mathrm e}^{12 d x +12 c}+28 a^{3} {\mathrm e}^{14 d x +14 c}-\frac {12 a \,b^{2}}{35}-6 a^{2} b \,{\mathrm e}^{16 d x +16 c}-24 a^{2} b \,{\mathrm e}^{14 d x +14 c}-12 a \,b^{2} {\mathrm e}^{14 d x +14 c}-\frac {32 b^{3} {\mathrm e}^{12 d x +12 c}}{3}+\frac {8 a^{3}}{3}-\frac {64 \,{\mathrm e}^{4 d x +4 c} b^{3}}{35}-72 a^{2} b \,{\mathrm e}^{10 d x +10 c}-\frac {6 a^{2} b}{5}-\frac {108 \,{\mathrm e}^{2 d x +2 c} a \,b^{2}}{35}-\frac {24 a^{2} b \,{\mathrm e}^{2 d x +2 c}}{5}-\frac {12 a \,b^{2} {\mathrm e}^{4 d x +4 c}}{35}-\frac {96 a^{2} b \,{\mathrm e}^{4 d x +4 c}}{5}-\frac {264 a^{2} b \,{\mathrm e}^{6 d x +6 c}}{5}-\frac {84 a \,b^{2} {\mathrm e}^{6 d x +6 c}}{5}+\frac {260 a^{3} {\mathrm e}^{12 d x +12 c}}{3}-\frac {16 b^{3}}{315}+4 a^{3} {\mathrm e}^{16 d x +16 c}-\frac {156 a \,b^{2} {\mathrm e}^{8 d x +8 c}}{5}-\frac {396 a^{2} b \,{\mathrm e}^{8 d x +8 c}}{5}+\frac {412 a^{3} {\mathrm e}^{6 d x +6 c}}{3}+\frac {32 \,{\mathrm e}^{6 d x +6 c} b^{3}}{5}+68 a^{3} {\mathrm e}^{4 d x +4 c}+20 a^{3} {\mathrm e}^{2 d x +2 c}-\frac {16 \,{\mathrm e}^{2 d x +2 c} b^{3}}{35}-\frac {112 b^{3} {\mathrm e}^{8 d x +8 c}}{5}-12 a \,b^{2} {\mathrm e}^{10 d x +10 c}-12 a \,b^{2} {\mathrm e}^{12 d x +12 c}}{d \left ({\mathrm e}^{2 d x +2 c}+1\right )^{9}}\) \(469\)

input
int((a+b*sech(d*x+c)^2)^3*tanh(d*x+c)^4,x,method=_RETURNVERBOSE)
 
output
a^3/d*(-1/3*tanh(d*x+c)^3-tanh(d*x+c)-1/2*ln(tanh(d*x+c)-1)+1/2*ln(tanh(d* 
x+c)+1))+b^3/d*(1/9*tanh(d*x+c)^9-2/7*tanh(d*x+c)^7+1/5*tanh(d*x+c)^5)+3/5 
*a^2*b/d*tanh(d*x+c)^5+3*a*b^2/d*(-1/7*tanh(d*x+c)^7+1/5*tanh(d*x+c)^5)
 
3.2.24.5 Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 1323 vs. \(2 (102) = 204\).

Time = 0.26 (sec) , antiderivative size = 1323, normalized size of antiderivative = 12.03 \[ \int \left (a+b \text {sech}^2(c+d x)\right )^3 \tanh ^4(c+d x) \, dx=\text {Too large to display} \]

input
integrate((a+b*sech(d*x+c)^2)^3*tanh(d*x+c)^4,x, algorithm="fricas")
 
output
1/315*((315*a^3*d*x + 420*a^3 - 189*a^2*b - 54*a*b^2 - 8*b^3)*cosh(d*x + c 
)^9 + 9*(315*a^3*d*x + 420*a^3 - 189*a^2*b - 54*a*b^2 - 8*b^3)*cosh(d*x + 
c)*sinh(d*x + c)^8 - (420*a^3 - 189*a^2*b - 54*a*b^2 - 8*b^3)*sinh(d*x + c 
)^9 + 9*(315*a^3*d*x + 420*a^3 - 189*a^2*b - 54*a*b^2 - 8*b^3)*cosh(d*x + 
c)^7 - 9*(280*a^3 + 21*a^2*b - 54*a*b^2 - 8*b^3 + 4*(420*a^3 - 189*a^2*b - 
 54*a*b^2 - 8*b^3)*cosh(d*x + c)^2)*sinh(d*x + c)^7 + 21*(4*(315*a^3*d*x + 
 420*a^3 - 189*a^2*b - 54*a*b^2 - 8*b^3)*cosh(d*x + c)^3 + 3*(315*a^3*d*x 
+ 420*a^3 - 189*a^2*b - 54*a*b^2 - 8*b^3)*cosh(d*x + c))*sinh(d*x + c)^6 + 
 36*(315*a^3*d*x + 420*a^3 - 189*a^2*b - 54*a*b^2 - 8*b^3)*cosh(d*x + c)^5 
 - 9*(14*(420*a^3 - 189*a^2*b - 54*a*b^2 - 8*b^3)*cosh(d*x + c)^4 + 700*a^ 
3 + 84*a^2*b + 204*a*b^2 - 32*b^3 + 21*(280*a^3 + 21*a^2*b - 54*a*b^2 - 8* 
b^3)*cosh(d*x + c)^2)*sinh(d*x + c)^5 + 9*(14*(315*a^3*d*x + 420*a^3 - 189 
*a^2*b - 54*a*b^2 - 8*b^3)*cosh(d*x + c)^5 + 35*(315*a^3*d*x + 420*a^3 - 1 
89*a^2*b - 54*a*b^2 - 8*b^3)*cosh(d*x + c)^3 + 20*(315*a^3*d*x + 420*a^3 - 
 189*a^2*b - 54*a*b^2 - 8*b^3)*cosh(d*x + c))*sinh(d*x + c)^4 + 84*(315*a^ 
3*d*x + 420*a^3 - 189*a^2*b - 54*a*b^2 - 8*b^3)*cosh(d*x + c)^3 - 3*(28*(4 
20*a^3 - 189*a^2*b - 54*a*b^2 - 8*b^3)*cosh(d*x + c)^6 + 105*(280*a^3 + 21 
*a^2*b - 54*a*b^2 - 8*b^3)*cosh(d*x + c)^4 + 2660*a^3 - 252*a^2*b - 252*a* 
b^2 + 896*b^3 + 120*(175*a^3 + 21*a^2*b + 51*a*b^2 - 8*b^3)*cosh(d*x + c)^ 
2)*sinh(d*x + c)^3 + 9*(4*(315*a^3*d*x + 420*a^3 - 189*a^2*b - 54*a*b^2...
 
3.2.24.6 Sympy [F]

\[ \int \left (a+b \text {sech}^2(c+d x)\right )^3 \tanh ^4(c+d x) \, dx=\int \left (a + b \operatorname {sech}^{2}{\left (c + d x \right )}\right )^{3} \tanh ^{4}{\left (c + d x \right )}\, dx \]

input
integrate((a+b*sech(d*x+c)**2)**3*tanh(d*x+c)**4,x)
 
output
Integral((a + b*sech(c + d*x)**2)**3*tanh(c + d*x)**4, x)
 
3.2.24.7 Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 1453 vs. \(2 (102) = 204\).

Time = 0.20 (sec) , antiderivative size = 1453, normalized size of antiderivative = 13.21 \[ \int \left (a+b \text {sech}^2(c+d x)\right )^3 \tanh ^4(c+d x) \, dx=\text {Too large to display} \]

input
integrate((a+b*sech(d*x+c)^2)^3*tanh(d*x+c)^4,x, algorithm="maxima")
 
output
3/5*a^2*b*tanh(d*x + c)^5/d + 1/3*a^3*(3*x + 3*c/d - 4*(3*e^(-2*d*x - 2*c) 
 + 3*e^(-4*d*x - 4*c) + 2)/(d*(3*e^(-2*d*x - 2*c) + 3*e^(-4*d*x - 4*c) + e 
^(-6*d*x - 6*c) + 1))) + 16/315*b^3*(9*e^(-2*d*x - 2*c)/(d*(9*e^(-2*d*x - 
2*c) + 36*e^(-4*d*x - 4*c) + 84*e^(-6*d*x - 6*c) + 126*e^(-8*d*x - 8*c) + 
126*e^(-10*d*x - 10*c) + 84*e^(-12*d*x - 12*c) + 36*e^(-14*d*x - 14*c) + 9 
*e^(-16*d*x - 16*c) + e^(-18*d*x - 18*c) + 1)) + 36*e^(-4*d*x - 4*c)/(d*(9 
*e^(-2*d*x - 2*c) + 36*e^(-4*d*x - 4*c) + 84*e^(-6*d*x - 6*c) + 126*e^(-8* 
d*x - 8*c) + 126*e^(-10*d*x - 10*c) + 84*e^(-12*d*x - 12*c) + 36*e^(-14*d* 
x - 14*c) + 9*e^(-16*d*x - 16*c) + e^(-18*d*x - 18*c) + 1)) - 126*e^(-6*d* 
x - 6*c)/(d*(9*e^(-2*d*x - 2*c) + 36*e^(-4*d*x - 4*c) + 84*e^(-6*d*x - 6*c 
) + 126*e^(-8*d*x - 8*c) + 126*e^(-10*d*x - 10*c) + 84*e^(-12*d*x - 12*c) 
+ 36*e^(-14*d*x - 14*c) + 9*e^(-16*d*x - 16*c) + e^(-18*d*x - 18*c) + 1)) 
+ 441*e^(-8*d*x - 8*c)/(d*(9*e^(-2*d*x - 2*c) + 36*e^(-4*d*x - 4*c) + 84*e 
^(-6*d*x - 6*c) + 126*e^(-8*d*x - 8*c) + 126*e^(-10*d*x - 10*c) + 84*e^(-1 
2*d*x - 12*c) + 36*e^(-14*d*x - 14*c) + 9*e^(-16*d*x - 16*c) + e^(-18*d*x 
- 18*c) + 1)) - 315*e^(-10*d*x - 10*c)/(d*(9*e^(-2*d*x - 2*c) + 36*e^(-4*d 
*x - 4*c) + 84*e^(-6*d*x - 6*c) + 126*e^(-8*d*x - 8*c) + 126*e^(-10*d*x - 
10*c) + 84*e^(-12*d*x - 12*c) + 36*e^(-14*d*x - 14*c) + 9*e^(-16*d*x - 16* 
c) + e^(-18*d*x - 18*c) + 1)) + 210*e^(-12*d*x - 12*c)/(d*(9*e^(-2*d*x - 2 
*c) + 36*e^(-4*d*x - 4*c) + 84*e^(-6*d*x - 6*c) + 126*e^(-8*d*x - 8*c) ...
 
3.2.24.8 Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 475 vs. \(2 (102) = 204\).

Time = 0.38 (sec) , antiderivative size = 475, normalized size of antiderivative = 4.32 \[ \int \left (a+b \text {sech}^2(c+d x)\right )^3 \tanh ^4(c+d x) \, dx=\frac {315 \, {\left (d x + c\right )} a^{3} + \frac {2 \, {\left (630 \, a^{3} e^{\left (16 \, d x + 16 \, c\right )} - 945 \, a^{2} b e^{\left (16 \, d x + 16 \, c\right )} + 4410 \, a^{3} e^{\left (14 \, d x + 14 \, c\right )} - 3780 \, a^{2} b e^{\left (14 \, d x + 14 \, c\right )} - 1890 \, a b^{2} e^{\left (14 \, d x + 14 \, c\right )} + 13650 \, a^{3} e^{\left (12 \, d x + 12 \, c\right )} - 7560 \, a^{2} b e^{\left (12 \, d x + 12 \, c\right )} - 1890 \, a b^{2} e^{\left (12 \, d x + 12 \, c\right )} - 1680 \, b^{3} e^{\left (12 \, d x + 12 \, c\right )} + 24570 \, a^{3} e^{\left (10 \, d x + 10 \, c\right )} - 11340 \, a^{2} b e^{\left (10 \, d x + 10 \, c\right )} - 1890 \, a b^{2} e^{\left (10 \, d x + 10 \, c\right )} + 2520 \, b^{3} e^{\left (10 \, d x + 10 \, c\right )} + 28350 \, a^{3} e^{\left (8 \, d x + 8 \, c\right )} - 12474 \, a^{2} b e^{\left (8 \, d x + 8 \, c\right )} - 4914 \, a b^{2} e^{\left (8 \, d x + 8 \, c\right )} - 3528 \, b^{3} e^{\left (8 \, d x + 8 \, c\right )} + 21630 \, a^{3} e^{\left (6 \, d x + 6 \, c\right )} - 8316 \, a^{2} b e^{\left (6 \, d x + 6 \, c\right )} - 2646 \, a b^{2} e^{\left (6 \, d x + 6 \, c\right )} + 1008 \, b^{3} e^{\left (6 \, d x + 6 \, c\right )} + 10710 \, a^{3} e^{\left (4 \, d x + 4 \, c\right )} - 3024 \, a^{2} b e^{\left (4 \, d x + 4 \, c\right )} - 54 \, a b^{2} e^{\left (4 \, d x + 4 \, c\right )} - 288 \, b^{3} e^{\left (4 \, d x + 4 \, c\right )} + 3150 \, a^{3} e^{\left (2 \, d x + 2 \, c\right )} - 756 \, a^{2} b e^{\left (2 \, d x + 2 \, c\right )} - 486 \, a b^{2} e^{\left (2 \, d x + 2 \, c\right )} - 72 \, b^{3} e^{\left (2 \, d x + 2 \, c\right )} + 420 \, a^{3} - 189 \, a^{2} b - 54 \, a b^{2} - 8 \, b^{3}\right )}}{{\left (e^{\left (2 \, d x + 2 \, c\right )} + 1\right )}^{9}}}{315 \, d} \]

input
integrate((a+b*sech(d*x+c)^2)^3*tanh(d*x+c)^4,x, algorithm="giac")
 
output
1/315*(315*(d*x + c)*a^3 + 2*(630*a^3*e^(16*d*x + 16*c) - 945*a^2*b*e^(16* 
d*x + 16*c) + 4410*a^3*e^(14*d*x + 14*c) - 3780*a^2*b*e^(14*d*x + 14*c) - 
1890*a*b^2*e^(14*d*x + 14*c) + 13650*a^3*e^(12*d*x + 12*c) - 7560*a^2*b*e^ 
(12*d*x + 12*c) - 1890*a*b^2*e^(12*d*x + 12*c) - 1680*b^3*e^(12*d*x + 12*c 
) + 24570*a^3*e^(10*d*x + 10*c) - 11340*a^2*b*e^(10*d*x + 10*c) - 1890*a*b 
^2*e^(10*d*x + 10*c) + 2520*b^3*e^(10*d*x + 10*c) + 28350*a^3*e^(8*d*x + 8 
*c) - 12474*a^2*b*e^(8*d*x + 8*c) - 4914*a*b^2*e^(8*d*x + 8*c) - 3528*b^3* 
e^(8*d*x + 8*c) + 21630*a^3*e^(6*d*x + 6*c) - 8316*a^2*b*e^(6*d*x + 6*c) - 
 2646*a*b^2*e^(6*d*x + 6*c) + 1008*b^3*e^(6*d*x + 6*c) + 10710*a^3*e^(4*d* 
x + 4*c) - 3024*a^2*b*e^(4*d*x + 4*c) - 54*a*b^2*e^(4*d*x + 4*c) - 288*b^3 
*e^(4*d*x + 4*c) + 3150*a^3*e^(2*d*x + 2*c) - 756*a^2*b*e^(2*d*x + 2*c) - 
486*a*b^2*e^(2*d*x + 2*c) - 72*b^3*e^(2*d*x + 2*c) + 420*a^3 - 189*a^2*b - 
 54*a*b^2 - 8*b^3)/(e^(2*d*x + 2*c) + 1)^9)/d
 
3.2.24.9 Mupad [B] (verification not implemented)

Time = 2.32 (sec) , antiderivative size = 1834, normalized size of antiderivative = 16.67 \[ \int \left (a+b \text {sech}^2(c+d x)\right )^3 \tanh ^4(c+d x) \, dx=\text {Too large to display} \]

input
int(tanh(c + d*x)^4*(a + b/cosh(c + d*x)^2)^3,x)
 
output
((3*a*b^2 + 13*a^3 + 16*b^3)/(63*d) + (10*exp(4*c + 4*d*x)*(3*a*b^2 + 13*a 
^3 + 16*b^3))/(63*d) + (20*exp(6*c + 6*d*x)*(6*a*b^2 + 3*a^2*b + 8*a^3 - 4 
*b^3))/(63*d) - (2*exp(2*c + 2*d*x)*(8*a*b^2 + 3*a^2*b - 10*a^3 + 16*b^3)) 
/(21*d) - (5*exp(8*c + 8*d*x)*(a*b^2 - a^3))/(3*d) - (2*exp(10*c + 10*d*x) 
*(3*a^2*b - 2*a^3))/(9*d))/(6*exp(2*c + 2*d*x) + 15*exp(4*c + 4*d*x) + 20* 
exp(6*c + 6*d*x) + 15*exp(8*c + 8*d*x) + 6*exp(10*c + 10*d*x) + exp(12*c + 
 12*d*x) + 1) - ((2*exp(2*c + 2*d*x)*(a*b^2 - a^3))/(3*d) - (2*(6*a*b^2 + 
3*a^2*b + 8*a^3 - 4*b^3))/(63*d) + (2*exp(4*c + 4*d*x)*(3*a^2*b - 2*a^3))/ 
(9*d))/(3*exp(2*c + 2*d*x) + 3*exp(4*c + 4*d*x) + exp(6*c + 6*d*x) + 1) + 
((3*a*b^2 + 13*a^3 + 16*b^3)/(63*d) + (2*exp(2*c + 2*d*x)*(6*a*b^2 + 3*a^2 
*b + 8*a^3 - 4*b^3))/(21*d) - (exp(4*c + 4*d*x)*(a*b^2 - a^3))/d - (2*exp( 
6*c + 6*d*x)*(3*a^2*b - 2*a^3))/(9*d))/(4*exp(2*c + 2*d*x) + 6*exp(4*c + 4 
*d*x) + 4*exp(6*c + 6*d*x) + exp(8*c + 8*d*x) + 1) - ((a*b^2 - a^3)/(3*d) 
+ (2*exp(2*c + 2*d*x)*(3*a^2*b - 2*a^3))/(9*d))/(2*exp(2*c + 2*d*x) + exp( 
4*c + 4*d*x) + 1) + a^3*x + ((2*(6*a*b^2 + 3*a^2*b + 8*a^3 - 4*b^3))/(63*d 
) + (2*exp(2*c + 2*d*x)*(3*a*b^2 + 13*a^3 + 16*b^3))/(21*d) + (20*exp(6*c 
+ 6*d*x)*(3*a*b^2 + 13*a^3 + 16*b^3))/(63*d) + (10*exp(8*c + 8*d*x)*(6*a*b 
^2 + 3*a^2*b + 8*a^3 - 4*b^3))/(21*d) - (2*exp(4*c + 4*d*x)*(8*a*b^2 + 3*a 
^2*b - 10*a^3 + 16*b^3))/(7*d) - (2*exp(10*c + 10*d*x)*(a*b^2 - a^3))/d - 
(2*exp(12*c + 12*d*x)*(3*a^2*b - 2*a^3))/(9*d))/(7*exp(2*c + 2*d*x) + 2...